package com.einmeer.kssc_administrator.mapper;

import com.einmeer.kssc_administrator.entity.Administrators;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 芊嵛
 * @date 2024/1/30
 */
@Mapper
public interface AdministratorsMapper {
    // 根据账号查询用户是否存在,返回用户id
    Integer selectAdministratorsIdByUN(String administratorsUsername);
    // 根据帐户密码登录,返回用户id
    Integer selectAdministratorsIdByUNAndPW(@Param("administratorsUsername") String administratorsUsername, @Param("administratorsPassword") String administratorsPassword);
    // 根据用户id返回用户信息
    Administrators selectAdministratorsById(Integer administratorsId);
    // 根据用户id和旧密码修改密码
    Integer updateAdministratorsByIdAndPassword(@Param("administratorsId") Integer administratorsUserId,@Param("administratorsOldPassword") String administratorsOldPassword,@Param("administratorsNewPassword") String administratorsNewPassword);
}
